//测试☑️
// var base_url = 'https://vendormina.lzljtdpx.com/';

//正式1☑️
var base_url = 'https://vendorapi.lzljtdpx.com/';

//正式2
// var base_url = 'https://sh-vendorapi.lzljtdpx.com/';

//腾讯云
// var base_url = 'https://vendor.lzljtdpx.com/';

var api = require('/utils/api.js')
var utils = require('/utils/util.js')
var app = getApp();

App({

  onLaunch: function() {
    var that = this;
    wx.getSystemInfo({
      success: function(res) {
        that.globalData.windowHeight = res.windowHeight
      }
    })
  },

  onShow:function(options){
    if (options.referrerInfo !=undefined && options.referrerInfo.appId =='wx2f5360b509c07b8a'){
      //用户版跳转过来的,
      this.globalData.redirect_appid = options.referrerInfo.appId;
    }else{
      this.globalData.redirect_appid = '';
    }
  },

  /*
      accountInfo：从服务器获取用户信息
      error_toast_duration : 持续时间
      login_url : 登录url
      logout_url :注销登录
      verifyCode_url：获取验证码接口
      forgetPwd_url：忘记面膜
      shopGoodsRebateList_url:商品分润表
      loginState:0 默认初始值 1登录 2退出 （退出登录中使用）
  */
  globalData: {
    loginTo: true, //是否能跳转登录
    redirect_appid:'',
    service_phone: '4000788519',
    userInfo: null,
    base_url: base_url,
    accountInfo: {},
    loginState: 0,
    error_toast_duration: 2000,
    current_shop_index: 0, //当前选中的店铺的index
    global_current_time: 0,


    login_tourist_url: base_url + 'user/login',
    login_url: base_url + 'shopuser/login',
    logout_url: base_url + "user/logout",
    verifyCode_url: base_url + "captcha/get",
    forgetPwd_url: base_url + "shopuser/modifyPasswd",

    //我的收入
    shopList_url: base_url + "shop/list",
    shopIncomeStatistics_url: base_url + "shop/incomeStatistics",
    shopGoodsRebateList_url: base_url + "shop/goodsRebateList",
    shopIncomeList_url: base_url + "shop/incomeList",
    shopMachineIS_url: base_url + "shop/machineIS",
    shopIncomeDetail_url: base_url + "shop/incomeDetail",
    shopIncomeStatistics_url: base_url + "shop/incomeStatistics",

    // 销售统计
    shopSaleStatistics_url: base_url + "shop/saleStatistics",
    shopSaleDetail_url: base_url + "shop/saleDetail", //总列表
    shopSaleList_url: base_url + "shop/saleList", //门店列表
    shopMachineSS_url: base_url + "shop/machineSS", //售酒机列表


    foremanApplyList_url: base_url + "foreman/applyList", //领班管理列表
    foremanAudit_url: base_url + "foreman/audit", //领班管理申请
    foremanShoplist_url: base_url + "foreman/shoplist", //领班管理门店列表
    foreman_login_url: base_url + "foreman/login", //加入领班 - 获取微信信息（登陆） --1
    foreman_joinForeman_url: base_url + "foreman/joinForeman", //加入领班 --显示加入领班页面 --2
    foreman_joinSubmit_url: base_url + "foreman/joinSubmit", //加入领班 - 提交确认信息 --3
    captcha_geturl: base_url + "captcha/get", //发送验证码
    waiterList_geturl: base_url + "waiter/list", //获取服务员管
    waiter_audit_url: base_url + "waiter/audit", //处理服务员操作
    waiterSubmit_url: base_url + "waiter/submit", //提交邀请服务员
    shop_orderList_url: base_url + "shop/orderList", //订单列表
    order_orderChangePrice_url: base_url + "shop/orderChangePrice", //订单改价
    waiter_shoplist_url: base_url + "waiter/shoplist", //获取门店列表信息
    login_waiter_url: base_url + "waiter/login", //加入服务员第一步  获取微信信息（登陆） 
    waiter_addInfo_url: base_url + "waiter/addInfo", //加入服务员第2步  
    shop_openDoor_url: base_url + "shop/openDoor", //扫码取货

    shop_orderRecord_url: base_url + "shop/orderRecord", //订单记录 （用于退换货）

    shop_getOrderInfo_url: base_url + "shop/getOrderInfo", //订单详情 （用于退换货）
    aftersale_getGoodsInfo_url: base_url + "aftersale/getGoodsInfo", //订单内某商品信息 （用于退换货）

    aftersale_apply_url: base_url + "aftersale/apply", //退换货申请
    aftersale_getInfo_url: base_url + "aftersale/getInfo", //查看退换货

    addAddress_url: base_url + "address/add",
    addressInfo_url: base_url + "address/info",
    editAddress_url: base_url + "address/modify",
    couponscheckdetails_url: base_url + "shop/scanInfo", //扫码后详情(通用)
    couponscheckcheck_url: base_url + "shop/scanTodo", //扫码后核销(通用)
    orderExpress_url: base_url + "shop/orderExpress"
  }



})